import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/views/Home.vue';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
        redirect: '/recommend'
    },
    {
        path: '/recommend',
        name: 'Recommend',
        component: ()=>import('@/views/Recommend')
    },
    {
        path: '/hot',
        name: 'Hot',
        component: ()=>import('@/views/Hot')
    },
    {
        path: '/search',
        name: 'Search',
        component: ()=>import('@/views/Search')
    },
    {
        path: '/recommend/recInfo',
        name: 'RecInfo',
        component: ()=>import('@/views/RecInfo')
    },
    {
        path: '/recommend/mv',
        name: 'Mv',
        component: ()=>import('@/views/Mv')
    },
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
});

export default router;